package com.bwf.pojo;

/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2022/12/19 13:58
 * @copyright: 博为峰
 */
public abstract class Account {
    private String cardNo;
    private String passwd;
    private double balance;

    public Account() {
    }

    public Account(String cardNo, String passwd, double balance) {
        this.cardNo = cardNo;
        this.passwd = passwd;
        this.balance = balance;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    //存钱
    public void save(double money) {
        this.balance += money;
    }

    //取钱
    public abstract void deposit(double money);
}
